﻿namespace KingerRobot.SailunMESService;

public interface IMesWebService
{

    /// <summary>
    /// 4.胎胚信息（WMS->MES） WMS拉取胎胚物料信息
    /// </summary>
    /// <param name="productCode"></param>
    /// <returns></returns>
    ProductGreenTireParam ProductGreenTire(string productCode);
    /// <summary>
    /// 8.出库订单状态（WMS->MES）出库订单发生变化时,推送出库订单状态
    /// </summary>
    int PushOutOrderStatus(List<PushOutOrderStatusMesParam> pushOutOrderStatusMesParams);
    /// <summary>
    /// 9.入库信息（WMS->MES）胎胚扫码后，进行胎胚入库，由WMS将信息推送至MES
    /// </summary>
    /// <param name="tireBarcode">胎胚条码</param>
    /// <param name="currentLoc">当前位置</param>
    /// <returns></returns>
    int PushWarehousing(string tireBarcode, string currentLoc);
    /// <summary>
    /// 10.出库信息（WMS->MES）开始执行堆垛机出库任务，由WMS将信息推送至MES
    /// </summary>
    int PushWarehousingOut(List<PushWarehousingOutMesParam> pushWarehousingOutMesParams);
    /// <summary>
    /// 11.直送信息（WMS->MES）
    /// </summary>
    /// <param name="pushDirectDeliveryMesParam"></param>
    /// <returns></returns>
    int PushDirectDelivery(PushDirectDeliveryMesParam pushDirectDeliveryMesParam);
    /// <summary>
    /// 12.入库完成（WMS->MES）堆垛机入库任务完成后，由WMS将信息推送至MES
    /// </summary>
    /// <param name="tireBarcode">胎胚条码</param>
    /// <param name="currentLoc">当前位置</param>
    /// <returns></returns>
    int PushWarehousingFinish(string tireBarcode, string currentLoc);
    /// <summary>
    /// 13.直送完成（WMS->MES）
    /// </summary>
    /// <param name="pushDirectDeliveryFinishParam"></param>
    /// <returns></returns>
    int PushDirectDeliveryFinish(PushDirectDeliveryFinishMesParam pushDirectDeliveryFinishMesParam);
    /// <summary>
    /// 14.出库完成（WMS->MES）出库任务EMS放胎完成到达硫化机后，由WMS将信息推送至MES
    /// </summary>
    int PushWarehousingOutFinish(List<PushWarehousingOutFinishMesParam> pushWarehousingOutFinishMesParams);
    /// <summary>
    /// 16.异常输送（WMS->MES）
    /// </summary>
    /// <param name="barCode"></param>
    /// <param name="startLoc"></param>
    /// <param name="targetLoc"></param>
    /// <returns></returns>
    int PushAbnormal(string barCode, long startLoc, long targetLoc);
    int test666();

}
public class PushOutOrderStatusMesParam
{
    /// <summary>
    /// 订单从表id
    /// </summary>
    public string OrderDetailId { get; set; }
    /// <summary>
    /// 订单状态
    /// </summary>
    public int OrderStatus { get; set; }
    /// <summary>
    /// 胎胚条码
    /// </summary>
    public string TireBarcode { get; set; }
}
public class PushWarehousingOutMesParam
{
    /// <summary>
    /// 订单从表id
    /// </summary>
    public string OrderDetailId { get; set; }
    /// <summary>
    /// 胎胚条码
    /// </summary>
    public string TireBarcode { get; set; }
    /// <summary>
    /// 当前位置
    /// </summary>
    public string CurrentLoc { get; set; }
    /// <summary>
    /// 目的地
    /// </summary>
    public string TargetLoc { get; set; }
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string EquipNo { get; set; }
    /// <summary>
    /// 硫化机左右模
    /// </summary>
    public int EquipModel { get; set; }
}
public class PushWarehousingOutFinishMesParam
{
    /// <summary>
    /// 订单从表id
    /// </summary>
    public string OrderDetailId { get; set; }
    /// <summary>
    /// 胎胚条码
    /// </summary>
    public string TireBarcode { get; set; }
    /// <summary>
    /// 目的地
    /// </summary>
    public string TargetLoc { get; set; }
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string EquipNo { get; set; }
    /// <summary>
    /// 硫化机左右模
    /// </summary>
    public int EquipModel { get; set; }
}
public class PushDirectDeliveryMesParam
{
    /// <summary>
    /// 胎胚条码
    /// </summary>
    public string BarCode { get; set; }
    /// <summary>
    /// 订单编号
    /// </summary>
    public string OrderDetailId { get; set; }
    /// <summary>
    /// 当前位置
    /// </summary>
    public string CurrentLoc { get; set; }
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string EquipNo { get; set; }
    /// <summary>
    /// 硫化机
    /// </summary>
    public string EquipModel { get; set; }
}
public class PushDirectDeliveryFinishMesParam
{
    /// <summary>
    /// 胎胚条码
    /// </summary>
    public string BarCode { get; set; }
    /// <summary>
    /// 订单编号
    /// </summary>
    public string OrderDetailId { get; set; }
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string EquipNo { get; set; }
    /// <summary>
    /// 硫化机
    /// </summary>
    public int EquipModel { get; set; }
}

public class ProductGreenTireParam 
{
    public string TireBarcode { get; set; }
    public string MaterialId { get; set; }
    public string ProductEquip { get; set; }
    public DateTime ProductTime { get; set; }
    public string ProductBatch { get; set; }
    public int TireLock { get; set; }
    public int QuailtyStatus { get; set; }
}